# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-xml-dom
_pkgname=XML-DOM
pkgver=1.46
pkgrel=10
pkgdesc="Implements Level 1 of W3's DOM."
arch=('any')
url='http://search.cpan.org/dist/XML-DOM'
license=('GPL' 'PerlArtistic')
depends=('perl' 'perl-xml-parser>=2.30' 'perl-xml-regexp' 'libxml-perl>=0.07'
         'perl-libwww')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/T/TJ/TJMATHER/$_pkgname-$pkgver.tar.gz")
sha512sums=('0fc96571996262bb0a99bd5f85e5d9e0f9c71c604c46c74129f0f560aa2749f7b945c591bfc13b9178d2b8d83826d5306f4ac71db33b51c55ce4d76398bab13d')

build() {
  cd "$_pkgname-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}

